package smdc.order.domain;

import java.math.BigDecimal;
import java.util.Date;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.fasterxml.jackson.annotation.JsonFormat;

import smdc.common.annotation.Excel;
import smdc.common.core.domain.BaseEntity;

/**
 * 订单主对象 order_master
 * 
 * @author maorui
 * @date 2025-03-28
 */
public class OrderMaster extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 订单ID */
    private String orderId;

    /** 桌号ID */
    @Excel(name = "桌号ID")
    private Long tableId;

    /** 订单编号 */
    @Excel(name = "订单编号")
    private String orderNumber;

    /** 用餐人数 */
    @Excel(name = "用餐人数")
    private Long customerCount;

    /** 订单总金额 */
    @Excel(name = "订单总金额")
    private BigDecimal totalAmount;

    /** 优惠金额 */
    @Excel(name = "优惠金额")
    private BigDecimal discountAmount;

    /** 实付金额 */
    @Excel(name = "实付金额")
    private BigDecimal actualAmount;

    /** 订单状态(0-待支付 1-已支付 2-已完成 3-已取消) */
    @Excel(name = "订单状态(0-待支付 1-已支付 2-已完成 3-已取消)")
    private Integer orderStatus;

    /** 支付方式(1-微信 2-支付宝 3-现金) */
    @Excel(name = "支付方式(1-微信 2-支付宝 3-现金)")
    private Integer payMethod;

    /** 支付时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date payTime;

    public void setOrderId(String orderId) 
    {
        this.orderId = orderId;
    }

    public String getOrderId() 
    {
        return orderId;
    }
    public void setTableId(Long tableId) 
    {
        this.tableId = tableId;
    }

    public Long getTableId() 
    {
        return tableId;
    }
    public void setOrderNumber(String orderNumber) 
    {
        this.orderNumber = orderNumber;
    }

    public String getOrderNumber() 
    {
        return orderNumber;
    }
    public void setCustomerCount(Long customerCount) 
    {
        this.customerCount = customerCount;
    }

    public Long getCustomerCount() 
    {
        return customerCount;
    }
    public void setTotalAmount(BigDecimal totalAmount) 
    {
        this.totalAmount = totalAmount;
    }

    public BigDecimal getTotalAmount() 
    {
        return totalAmount;
    }
    public void setDiscountAmount(BigDecimal discountAmount) 
    {
        this.discountAmount = discountAmount;
    }

    public BigDecimal getDiscountAmount() 
    {
        return discountAmount;
    }
    public void setActualAmount(BigDecimal actualAmount) 
    {
        this.actualAmount = actualAmount;
    }

    public BigDecimal getActualAmount() 
    {
        return actualAmount;
    }
    public void setOrderStatus(Integer orderStatus) 
    {
        this.orderStatus = orderStatus;
    }

    public Integer getOrderStatus() 
    {
        return orderStatus;
    }
    public void setPayMethod(Integer payMethod) 
    {
        this.payMethod = payMethod;
    }

    public Integer getPayMethod() 
    {
        return payMethod;
    }
    public void setPayTime(Date payTime) 
    {
        this.payTime = payTime;
    }

    public Date getPayTime() 
    {
        return payTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("orderId", getOrderId())
            .append("tableId", getTableId())
            .append("orderNumber", getOrderNumber())
            .append("customerCount", getCustomerCount())
            .append("totalAmount", getTotalAmount())
            .append("discountAmount", getDiscountAmount())
            .append("actualAmount", getActualAmount())
            .append("orderStatus", getOrderStatus())
            .append("payMethod", getPayMethod())
            .append("payTime", getPayTime())
            .append("remark", getRemark())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
